cmake_minimum_required(VERSION 3.14 FATAL_ERROR)

project(rnnt_decoder VERSION 1.0.0 LANGUAGES CXX)
# SET(CMAKE_CXX_COMPILER "/usr/bin/g++")
set(lib_root /home/gaoxinglong/env/lib)
set(CMAKE_PREFIX_PATH ${lib_root}/libtorch)
set(CUDNN_INCLUDE_DIR ${lib_root}/cudnn_8.6.0/include)
set(CUDNN_LIBRARY ${lib_root}/cudnn_8.6.0/lib)

find_package(Torch REQUIRED)

set(EXECUTABLE_NAME runtime_decoder_test)
add_library(rnnt_decoder linux-native-lib.cpp streaming_asr_on_device.cpp feature_pipeline.cc fft.cc iniparser.cpp dictionary.cpp online_streaming.cpp)

add_executable(${EXECUTABLE_NAME})
target_link_libraries(rnnt_decoder ${TORCH_LIBRARIES})
target_sources(${EXECUTABLE_NAME} PRIVATE cpp_decode_test.cpp streaming_asr_on_device.cpp feature_pipeline.cc fft.cc online_streaming.cpp iniparser.cpp dictionary.cpp)

target_link_libraries(${EXECUTABLE_NAME} ${TORCH_LIBRARIES})

set_target_properties(${EXECUTABLE_NAME} PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED YES)